package lab5Source;

import lab5Source.S_Message.msgtypes;

public class S_GoState extends AbstractState {

	@Override
	public void nextAction(LadyBird lady) {
		Boolean goResult = lady.go();
		lady.setChanged();
		lady.notifyObservers(new S_Message(msgtypes.CHECK_COLLIDE));
		
		// check if state should be changed
		if (goResult) {			
			this.setNextState(new S_StandState());
			lady.setState(this.nextState);
		}

	}

}
